package com.tg.demo.common.study;

/**
 * TestMain
 *
 * @author yuanjin
 * @date 2019/3/22
 */
public class Son extends Father {
    {
        System.out.println("子类普通块");
    }

    public int kk = printSS();

    public int printSS() {
        System.out.println("子类普通变量");
        return 523;
    }

    public Son() {
        System.out.println("子类构造");
    }

    public static int k = printS();

    public static int printS() {
        System.out.println("子类静态变量");
        return 522;
    }

    public static void main(String[] args) {
        Son son = new Son();
        System.out.println("main start");

    }

    static {
        System.out.println("子类静态块");
    }

}

class Father {

    public int tt = printFF();

    {
        System.out.println("父类普通块");
    }

    public int printFF() {
        System.out.println("父类普通变量");
        return 524;
    }

    public Father() {
        System.out.println("父类构造");
    }

    static {
        System.out.println("父类静态块");
    }

    public static int j = printF();

    public static int printF() {
        System.out.println("父类静态变量");
        return 521;
    }
}